<%-- 
    Document   : index
    Created on : 25/01/2014, 07:16:37
    Author     : Felipe Ribeiro
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><bean:message key="welcome.title"/></title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"/> 
        <link rel="stylesheet" href="./css/bootstrap-theme.min.css"/> 
        <link rel="stylesheet" href="./css/index.css"/> 
        <script type="text/javascript" src="./js/jquery-2.1.0.min.js"></script>
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>

        <!-- Just for debugging purposes. Don't actually copy this line! -->
        <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>

        <!-- Static navbar -->
        <div class="navbar navbar-default navbar-static-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand" href="Welcome.do"><bean:message key="welcome.heading"/></a>
                    <p class="navbar-text">O buscador Pub/Sub do IME-UERJ</p>
                    <form class="navbar-form navbar-left" role="search" action="buscar.do">
                        <div class="form-group">
                            <input type="text" class="form-control" id="q" name="q" placeholder="O que você está procurando?" maxlength="60" size="60" value="${param.q}">
                        </div>
                        <button type="submit" class="btn btn-default">Pesquisar</button>
                    </form>
                </div>
            </div>
        </div>

        <div class="container">

            <div class="panel panel-default">
                <div class="panel-heading">Resultado da Pesquisa - Aproximadamente ${requestScope.quantidade} resultado(s)</div>
                <div class="panel-body">
                    <ul class="list-group">
                        <c:forEach items="${requestScope.lista}" var="list">
                            <li class="list-group-item">
                                <h4>${list.titulo}</h2><br>
                                <h5>${list.resumo}</h1> 
                                <h6><a href="${list.url}"> ${list.url}</a></h6>
                            </li>
                        </c:forEach>  
                    </ul>
                </div>
            </div>

        </div> <!-- /container -->

        <div id="footer">
            <div class="container">
                <p class="text-muted">Universidade do Estado do Rio de Janeiro</p>
            </div>
        </div>
    </body>
</html>
